<?php

namespace app\mobile\controller;

use app\admin\model\Product as ModelProduct;
use app\common\controller\Frontend;


class Product extends Frontend
{

    protected $noNeedLogin = '*';
    protected $noNeedRight = '*';
    protected $layout = '';

    public function info()
    {
        $id = input('id',0,'intval');
        if (empty($id)) {
            $this->error('参数ID不能为空');
        }
        $info = ModelProduct::where('status',1)->where('id',$id)->find();
        if (empty($info)) {
            $this->error('没有数据');
        }
        $this->assign('info',$info);
        return $this->view->fetch();
    }

}
